<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/internal/MacroTools.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li><li class="navelem"><a class="el" href="dir_1865c4ce8b99f52bbeabfd52bfdd7cd3.html">internal</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#enum-members">枚举</a>  </div>
  <div class="headertitle">
<div class="title">MacroTools.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="tools_8h_source.html">../../tools/tools.h</a>&quot;</code><br />
</div>
<p><a href="socket_2internal_2_macro_tools_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a594566cc6256a59265af97f3fb79f46e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a594566cc6256a59265af97f3fb79f46e">CHECK_BIND_SERVER_GOTO</a>(sock,  ec,  lable)</td></tr>
<tr class="separator:a594566cc6256a59265af97f3fb79f46e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a402712afaac5db73261c42486b37fb26"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a402712afaac5db73261c42486b37fb26">CHECK_BIND_SERVER</a>(sock,  ec)</td></tr>
<tr class="separator:a402712afaac5db73261c42486b37fb26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70ca7033ad60da03feeda19abbe7a01f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a70ca7033ad60da03feeda19abbe7a01f">CHECK_SOCKET_INIT_GOTO</a>(bInit,  cliSock,  svrSock,  ec,  lable)</td></tr>
<tr class="separator:a70ca7033ad60da03feeda19abbe7a01f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc07ff0ff536a0d98f5a0a906f7592a7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#adc07ff0ff536a0d98f5a0a906f7592a7">CHECK_SOCKET_INIT</a>(bInit,  cliSock,  svrSock,  ec)</td></tr>
<tr class="separator:adc07ff0ff536a0d98f5a0a906f7592a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61a4de8159564bd2075db44c463f7a37"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a61a4de8159564bd2075db44c463f7a37">CHECK_SOCKET_ACCEPT</a>(bInit,  sock,  svrSock,  ec)</td></tr>
<tr class="separator:a61a4de8159564bd2075db44c463f7a37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0963ca422eb34520198e31cf6b177363"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a0963ca422eb34520198e31cf6b177363">CHECK_SOCKET_ACCEPT_GOTO</a>(bInit,  cliSock,  svrSock,  ec,  lable)</td></tr>
<tr class="separator:a0963ca422eb34520198e31cf6b177363"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab35422cd5048a841c614a13ab1e34b30"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#ab35422cd5048a841c614a13ab1e34b30">CHECK_SOCKET_BIND_AND_INIT_SERVER_GOTO</a>(sock,  ec,  lable)</td></tr>
<tr class="separator:ab35422cd5048a841c614a13ab1e34b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93c0956b3d2ecf21de89ba8aec089c3c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a93c0956b3d2ecf21de89ba8aec089c3c">CHECK_SOCKET_BIND_AND_INIT_SERVER</a>(sock,  ec)</td></tr>
<tr class="separator:a93c0956b3d2ecf21de89ba8aec089c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae254bb5047b6c4c99a9e302b87041eef"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#ae254bb5047b6c4c99a9e302b87041eef">CHECK_HANDLE_AND_RETURN</a>(hHandle,  ec,  dwLogLevel)</td></tr>
<tr class="separator:ae254bb5047b6c4c99a9e302b87041eef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada547345b32daf26df355a2b3d9b5a06"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#ada547345b32daf26df355a2b3d9b5a06">MAX_EVENTS_SIZE</a>&#160;&#160;&#160;256</td></tr>
<tr class="separator:ada547345b32daf26df355a2b3d9b5a06"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
枚举</h2></td></tr>
<tr class="memitem:a6a02b2d1d62293b20242e3dcfbdd0117"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a6a02b2d1d62293b20242e3dcfbdd0117">OperatorType</a> { <a class="el" href="socket_2internal_2_macro_tools_8h.html#a6a02b2d1d62293b20242e3dcfbdd0117ab3eb5fc1c2881f12082d288b4fc0362a">read_op</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a6a02b2d1d62293b20242e3dcfbdd0117a495315afb928424392a304f43d96cadb">write_op</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a6a02b2d1d62293b20242e3dcfbdd0117a0fe13fc305ec60c5bb2c1cf11115ba4c">op_size</a>
 }</td></tr>
<tr class="separator:a6a02b2d1d62293b20242e3dcfbdd0117"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a188154dc119900e88c49eb1509810eb1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1">IoCompleteKey</a> { <br />
&#160;&#160;<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a1240b20d386d820628fc3346421cb5be">ASYNC_NORMAL</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1add077376f83a9d647391982e5ab6165f">ASYNC_CLOSE</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a411478bc403c60e45d9ec2a8a81ccff5">ASYNC_TIMEOUT</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a98eb1c6912b405f72077623bf35b84d0">ASYNC_EXIT</a>, 
<br />
&#160;&#160;<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a0bf0069a0dc92f478e26530b34724c54">ASYNC_COMPLETE</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1ae9092fcf5b69fe04c51407da6f78d71a">ASYNC_INIT</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a53a0b28e438eedaa078b3e5caf7683b0">ASYNC_ACCEPT</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1acbced1b41bfc12f3d43285c159dbd2cf">ASYNC_CONNECT</a>, 
<br />
&#160;&#160;<a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1a77c97c2869d7aeef57d865d61467fe11">ASYNC_MAX</a>
<br />
 }</td></tr>
<tr class="separator:a188154dc119900e88c49eb1509810eb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ca3850e00ae5fc952cc19fe8e1983c0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="socket_2internal_2_macro_tools_8h.html#a8ca3850e00ae5fc952cc19fe8e1983c0">UpdateAction</a> { <a class="el" href="socket_2internal_2_macro_tools_8h.html#a8ca3850e00ae5fc952cc19fe8e1983c0aad86562c2b3d6e7eb6f89c9e373d916b">DELETE_ACTION</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a8ca3850e00ae5fc952cc19fe8e1983c0abfd6aec6483c4db68bcdd242b3712e2f">UPDATE_ACTION</a>, 
<a class="el" href="socket_2internal_2_macro_tools_8h.html#a8ca3850e00ae5fc952cc19fe8e1983c0a6fdfab6b4db26c3b4f122765b77e5061">ADD_ACTION</a>
 }</td></tr>
<tr class="separator:a8ca3850e00ae5fc952cc19fe8e1983c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">宏定义说明</h2>
<a id="a402712afaac5db73261c42486b37fb26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a402712afaac5db73261c42486b37fb26">&#9670;&nbsp;</a></span>CHECK_BIND_SERVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_BIND_SERVER</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (sock.GetService()-&gt;GetIoPortService() != <span class="keyword">this</span> || sock.GetServiceBuffer()-&gt;isBindService == <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec.SetError(CSockError::BIND_SERVER_ERROR); \</div>
<div class="line">    }</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00056">56</a> 行定义.</p>

</div>
</div>
<a id="a594566cc6256a59265af97f3fb79f46e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a594566cc6256a59265af97f3fb79f46e">&#9670;&nbsp;</a></span>CHECK_BIND_SERVER_GOTO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_BIND_SERVER_GOTO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">lable&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (sock.GetService()-&gt;GetIoPortService() != <span class="keyword">this</span> || sock.GetServiceBuffer()-&gt;isBindService == <a class="code" href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec.SetError(CSockError::BIND_SERVER_ERROR); \</div>
<div class="line">        goto lable;\</div>
<div class="line">    }</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00049">49</a> 行定义.</p>

</div>
</div>
<a id="ae254bb5047b6c4c99a9e302b87041eef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae254bb5047b6c4c99a9e302b87041eef">&#9670;&nbsp;</a></span>CHECK_HANDLE_AND_RETURN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_HANDLE_AND_RETURN</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">hHandle, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">dwLogLevel&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{ \</div>
<div class="line">if (!hHandle) { ec.SetError(CSockError::SYS_ERROR); <a class="code" href="debug_8h.html#a0572954070a5f8e650d85dcf9cfa6886">WRITELOGMSG</a>(<span class="stringliteral">&quot;handle is nullptr=&gt;&quot;</span>, ec.GetErrorMsg(), dwLogLevel); <span class="keywordflow">return</span> ec; }; \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00125">125</a> 行定义.</p>

</div>
</div>
<a id="a61a4de8159564bd2075db44c463f7a37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61a4de8159564bd2075db44c463f7a37">&#9670;&nbsp;</a></span>CHECK_SOCKET_ACCEPT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_ACCEPT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bInit, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">svrSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{\</div>
<div class="line">    if(svrSock.GetServiceBuffer() == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>){ \</div>
<div class="line">        ec.SetError(CSockError::NOLISTEN); \</div>
<div class="line">    }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(svrSock.GetService()-&gt;GetIoPortService() != <span class="keyword">this</span>) { \</div>
<div class="line">        ec.SetError(CSockError::BIND_SERVER_ERROR); \</div>
<div class="line">    }<span class="keywordflow">else</span>{ \</div>
<div class="line">        CHECK_SOCKET_INIT(bInit, sock, svrSock, ec); \</div>
<div class="line">    } \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00089">89</a> 行定义.</p>

</div>
</div>
<a id="a0963ca422eb34520198e31cf6b177363"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0963ca422eb34520198e31cf6b177363">&#9670;&nbsp;</a></span>CHECK_SOCKET_ACCEPT_GOTO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_ACCEPT_GOTO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bInit, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cliSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">svrSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">lable&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{\</div>
<div class="line">    if(svrSock.GetService()-&gt;GetIoPortService() != <span class="keyword">this</span>) { \</div>
<div class="line">        ec.SetError(CSockError::BIND_SERVER_ERROR); \</div>
<div class="line">        goto lable; \</div>
<div class="line">    }<span class="keywordflow">else</span>{ \</div>
<div class="line">        CHECK_SOCKET_INIT_GOTO(bInit, cliSock, svrSock, ec, lable); \</div>
<div class="line">    } \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00099">99</a> 行定义.</p>

</div>
</div>
<a id="a93c0956b3d2ecf21de89ba8aec089c3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93c0956b3d2ecf21de89ba8aec089c3c">&#9670;&nbsp;</a></span>CHECK_SOCKET_BIND_AND_INIT_SERVER</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_BIND_AND_INIT_SERVER</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{ \</div>
<div class="line">    if (sock.GetServiceBuffer() == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec.SetError(<a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959">CSockError::UNINIT</a>); \</div>
<div class="line">    } \</div>
<div class="line">    CHECK_BIND_SERVER(sock, ec); \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00117">117</a> 行定义.</p>

</div>
</div>
<a id="ab35422cd5048a841c614a13ab1e34b30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab35422cd5048a841c614a13ab1e34b30">&#9670;&nbsp;</a></span>CHECK_SOCKET_BIND_AND_INIT_SERVER_GOTO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_BIND_AND_INIT_SERVER_GOTO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">sock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">lable&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{ \</div>
<div class="line">    if (sock.GetServiceBuffer() == <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a> || *sock.GetSockPtr() == <a class="code" href="tools_8h.html#a26769957ec1a2beaf223f33b66ee64ab">INVALID_SOCKET</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec.SetError(<a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959">CSockError::UNINIT</a>); \</div>
<div class="line">        goto lable; \</div>
<div class="line">    } \</div>
<div class="line">    CHECK_BIND_SERVER_GOTO(sock, ec, lable); \</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00108">108</a> 行定义.</p>

</div>
</div>
<a id="adc07ff0ff536a0d98f5a0a906f7592a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc07ff0ff536a0d98f5a0a906f7592a7">&#9670;&nbsp;</a></span>CHECK_SOCKET_INIT</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_INIT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bInit, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cliSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">svrSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{\</div>
<div class="line">    if (!cliSock.GetServiceBuffer()) \</div>
<div class="line">    {\</div>
<div class="line">        ec.SetError(<a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959">CSockError::UNINIT</a>); \</div>
<div class="line">    }\</div>
<div class="line">    if (bInit &amp;&amp; *cliSock.GetSockPtr() == <a class="code" href="tools_8h.html#a26769957ec1a2beaf223f33b66ee64ab">INVALID_SOCKET</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec = cliSock.Socket(svrSock.GetSocketData()-&gt;_sockaddr.GetDomain(), svrSock.GetSocketData()-&gt;_type, svrSock.GetSocketData()-&gt;_protocol); \</div>
<div class="line">    }\</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00078">78</a> 行定义.</p>

</div>
</div>
<a id="a70ca7033ad60da03feeda19abbe7a01f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70ca7033ad60da03feeda19abbe7a01f">&#9670;&nbsp;</a></span>CHECK_SOCKET_INIT_GOTO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CHECK_SOCKET_INIT_GOTO</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bInit, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cliSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">svrSock, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">ec, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">lable&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<b>值:</b><div class="fragment"><div class="line">{\</div>
<div class="line">    if (!cliSock.GetServiceBuffer()) \</div>
<div class="line">    {\</div>
<div class="line">        ec.SetError(<a class="code" href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959">CSockError::UNINIT</a>); \</div>
<div class="line">        goto lable; \</div>
<div class="line">    }\</div>
<div class="line">    if (bInit &amp;&amp; *cliSock.GetSockPtr() == <a class="code" href="tools_8h.html#a26769957ec1a2beaf223f33b66ee64ab">INVALID_SOCKET</a>) \</div>
<div class="line">    { \</div>
<div class="line">        ec = cliSock.Socket(svrSock.GetSocketData()-&gt;_sockaddr.GetDomain(), svrSock.GetSocketData()-&gt;_type, svrSock.GetSocketData()-&gt;_protocol); \</div>
<div class="line">        if (ec) \</div>
<div class="line">        { \</div>
<div class="line">            goto lable; \</div>
<div class="line">        }\</div>
<div class="line">    }\</div>
<div class="line">}</div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00062">62</a> 行定义.</p>

</div>
</div>
<a id="ada547345b32daf26df355a2b3d9b5a06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada547345b32daf26df355a2b3d9b5a06">&#9670;&nbsp;</a></span>MAX_EVENTS_SIZE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_EVENTS_SIZE&#160;&#160;&#160;256</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00129">129</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">枚举类型说明</h2>
<a id="a188154dc119900e88c49eb1509810eb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a188154dc119900e88c49eb1509810eb1">&#9670;&nbsp;</a></span>IoCompleteKey</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="socket_2internal_2_macro_tools_8h.html#a188154dc119900e88c49eb1509810eb1">IoCompleteKey</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a1240b20d386d820628fc3346421cb5be"></a>ASYNC_NORMAL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1add077376f83a9d647391982e5ab6165f"></a>ASYNC_CLOSE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a411478bc403c60e45d9ec2a8a81ccff5"></a>ASYNC_TIMEOUT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a98eb1c6912b405f72077623bf35b84d0"></a>ASYNC_EXIT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a0bf0069a0dc92f478e26530b34724c54"></a>ASYNC_COMPLETE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1ae9092fcf5b69fe04c51407da6f78d71a"></a>ASYNC_INIT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a53a0b28e438eedaa078b3e5caf7683b0"></a>ASYNC_ACCEPT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1acbced1b41bfc12f3d43285c159dbd2cf"></a>ASYNC_CONNECT&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a188154dc119900e88c49eb1509810eb1a77c97c2869d7aeef57d865d61467fe11"></a>ASYNC_MAX&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00023">23</a> 行定义.</p>

</div>
</div>
<a id="a6a02b2d1d62293b20242e3dcfbdd0117"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a02b2d1d62293b20242e3dcfbdd0117">&#9670;&nbsp;</a></span>OperatorType</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="socket_2internal_2_macro_tools_8h.html#a6a02b2d1d62293b20242e3dcfbdd0117">OperatorType</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a6a02b2d1d62293b20242e3dcfbdd0117ab3eb5fc1c2881f12082d288b4fc0362a"></a>read_op&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a6a02b2d1d62293b20242e3dcfbdd0117a495315afb928424392a304f43d96cadb"></a>write_op&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a6a02b2d1d62293b20242e3dcfbdd0117a0fe13fc305ec60c5bb2c1cf11115ba4c"></a>op_size&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00016">16</a> 行定义.</p>

</div>
</div>
<a id="a8ca3850e00ae5fc952cc19fe8e1983c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ca3850e00ae5fc952cc19fe8e1983c0">&#9670;&nbsp;</a></span>UpdateAction</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="socket_2internal_2_macro_tools_8h.html#a8ca3850e00ae5fc952cc19fe8e1983c0">UpdateAction</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a8ca3850e00ae5fc952cc19fe8e1983c0aad86562c2b3d6e7eb6f89c9e373d916b"></a>DELETE_ACTION&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a8ca3850e00ae5fc952cc19fe8e1983c0abfd6aec6483c4db68bcdd242b3712e2f"></a>UPDATE_ACTION&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a8ca3850e00ae5fc952cc19fe8e1983c0a6fdfab6b4db26c3b4f122765b77e5061"></a>ADD_ACTION&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html">MacroTools.h</a> 第 <a class="el" href="socket_2internal_2_macro_tools_8h_source.html#l00037">37</a> 行定义.</p>

</div>
</div>
</div><!-- contents -->
<div class="ttc" id="atools_8h_html_a26769957ec1a2beaf223f33b66ee64ab"><div class="ttname"><a href="tools_8h.html#a26769957ec1a2beaf223f33b66ee64ab">INVALID_SOCKET</a></div><div class="ttdeci">#define INVALID_SOCKET</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00215">tools.h:215</a></div></div>
<div class="ttc" id="adebug_8h_html_a0572954070a5f8e650d85dcf9cfa6886"><div class="ttname"><a href="debug_8h.html#a0572954070a5f8e650d85dcf9cfa6886">WRITELOGMSG</a></div><div class="ttdeci">#define WRITELOGMSG(head, msg, nLogLevel)</div><div class="ttdef"><b>Definition:</b> <a href="debug_8h_source.html#l00024">debug.h:24</a></div></div>
<div class="ttc" id="atools_8h_html_aa93f0eb578d23995850d61f7d61c55c1"><div class="ttname"><a href="tools_8h.html#aa93f0eb578d23995850d61f7d61c55c1">FALSE</a></div><div class="ttdeci">#define FALSE</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00148">tools.h:148</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="anamespace_s_o_c_k_e_t_s_t_a_t_u_s_html_a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959"><div class="ttname"><a href="namespace_s_o_c_k_e_t_s_t_a_t_u_s.html#a960fa087f22eb32da3c7d0c805be7876a5a76b20cc3c857f53d6e5e7e817c8959">SOCKETSTATUS::UNINIT</a></div><div class="ttdoc">未初始化</div><div class="ttdef"><b>Definition:</b> <a href="_socket_def_8h_source.html#l00087">SocketDef.h:87</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
